<template>
  <div class="card">
    <div class="img-warpper"> <img :src="require(`@/assets/img/${item.name}.jpg`)" :alt="item.name">
      <div>
        <h1> {{item.name}} </h1>
        <h2>{{item.festival}} </h2>
      </div>
    </div>
    <p> <i>假期描述:</i><span>{{item.desc}}</span></p>
    <p> <i>拼假建议:</i><span>{{item.rest}}</span></p>
  </div>
</template>
<script>
export default {
  name: 'month-list',
  props: {
    item: Object
  }
}
</script>
<style lang="less" scoped>
.card {
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  padding-bottom: 15px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  box-shadow: 0, 5px, 10px, 10px, rgba(0, 0, 0, 0.2);
}
.img-warpper {
  position: relative;
  width: 100%;
  height: 180px;
  border-bottom: 1px solid #ccc;
  img {
    width: 100%;
    height: 100%;
  }
  div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
    h1 {
      font-size: 40px;
      color: #d40404;
    }
    h2 {
      font-size: 20px;
      color: #ffffff;
      margin-top: 10px;
      margin-bottom: -10px;
    }
  }
}
p {
  padding: 0 8px 0 14px;
  font-size: 14px;
  margin-top: 15px;
  i {
    margin-right: 5px;
  }
}
</style>
